package cn.net.autocode.platform.file.viewTemplate;

public class ImageView {

    public static final String template = """
            <!DOCTYPE html>
            <html lang="en" xmlns:th="http://www.thymeleaf.org">
            <head>
                <meta charset="utf-8" />
                <title>图片预览</title>
                <link rel="stylesheet" href="/links/viewer/viewer.min.css">
                <script src="/links/viewer/viewer.min.js"></script>
                <style>
                    body {
                        background-color: #404040;
                    }
                    #image { width: 800px; margin: 0 auto; font-size: 0;}
                    #image li {  display: inline-block;width: 50px;height: 50px; margin-left: 1%; padding-top: 1%;}
                </style>
            </head>
            <body>
            <ul id="image">
            <li><img id="{fileId}" src="/autocode/fileProvider/previewContent/{fileId}" style="display: none"></li>
            </ul>
            
            <script>
                var viewer = new Viewer(document.getElementById('image'), {
                    url: 'src',
                    navbar: false,
                    button: false,
                    backdrop: false,
                    loop : true
                });
                document.getElementById("{fileId}").click();
            </script>
            </body>
            </html>
            """;
}
